<template>
  <div>
    <div class="hotclass_box">
      <div class="zhu" @click="jiaoyudetail(classList.educationJosn)">
        <div class="zhu_top">
          <img
            :src="classList.educationJosn.cover"
            alt=""
          >
          <div>{{classList.educationJosn.click_number}}次学习</div>
        </div>
        <div class="zhu_down">
          <div>{{classList.educationJosn.name}}</div>
          <div>¥{{classList.educationJosn.preferential_money}}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['classList'],
  data () {
    return {}
  },
  methods: {
    jiaoyudetail (item) {
      // console.log(item.curriculum_id)
      this.$emit('jiaoyudetail', item)
      // this.$router.push({ name: '/coursedetails', params: { curriculumId: item.curriculum_id } })
    }
  },
  components: {},
  created () {
  }
}
</script>
<style>
.hotclass_box {
  width: calc(100vw *670/750);
  margin: 0 auto;
  padding-bottom: 25px;
}

.zhu {
  width: 100%;
  height: 226px;
  height:  calc(100vw *670/750* 453/670);
  background-color: #ffffff;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.18);
  border-radius: 5px;
  overflow: hidden;
}
.zhu_top {
  position: relative;
  height:  calc(100vw *670/750* 360/670);
}
.zhu_top > img {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height:  calc(100vw *670/750*360/670);
  border-radius: 8px 8px 0px 0px;
}
.zhu_top > div {
  width: 100%;
  height:  calc(100vw *670/750*60/670);
  background-color: #000000;
  opacity: 0.5;
  font-family: PingFangSC-Regular;
  font-size: 12px;
  font-weight: normal;
  font-stretch: normal;
  line-height: calc(100vw *670/750*60/670);
  letter-spacing: 0px;
  color: #ffffff;
  position: absolute;
  bottom: 0px;
  left: 0px;
  padding-left: 20px;
}
.zhu_down {
  height: calc(100vw *670/750*97/670);
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  align-content: space-between;
  align-items: center;
  padding: 0 20px;
}
.zhu_down > div:first-child {
  font-family: PingFangSC-Medium;
  font-size: 15px;
  font-weight: normal;
  font-stretch: normal;
  line-height:calc(100vw *670/750*97/670);
  letter-spacing: 0px;
  color: #1a1a1a;
  display: inline-block;
  height: calc(100vw *670/750*97/670);
  width:  calc(100vw *670/750*300/670);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zhu_down > div:last-child {
  font-family: PingFangSC-Medium;
  font-size: 14px;
  font-weight: normal;
  font-stretch: normal;
  line-height:calc(100vw *670/750*97/670);
  letter-spacing: 0px;
  color: #fd5e5e;
  display: inline-block;
}
</style>
